<template>
<div style="height: 400px;">
  <canvas id="charts14"/>
</div>
</template>
<script>
/*  import Chart from 'chart.js'*/
  export default {
    data () {
      return {}
    },
    mounted () {
      this.drawchart()
    },
    methods: {
      radarConfig () {
    var chartColors = {
        red: 'rgb(255, 99, 132)',
        orange: 'rgb(255, 159, 64)',
        yellow: 'rgb(255, 205, 86)',
        green: 'rgb(75, 192, 192)',
        blue: 'rgb(54, 162, 235)',
        purple: 'rgb(153, 102, 255)',
        grey: 'rgb(231,233,237)'
    };

/*    var color = Chart.helpers.color;*/
    var config = {
        // 图标类型
        type: 'radar',
        series: ['Product A', 'Product B'],
        data: {
            series: ['Product A', 'Product B'],
            // 雷达图的角
            labels: ["影响力", "内容偏好", "渠道偏好", "医生潜力", "合作意愿","学术水平"],
            color: '#fff',
            datasets: [{
              series: 'aaa',
                // 雷达图颜色
                backgroundColor: '#ccc',
                borderColor: 'rgb(54, 162, 235)',
                pointBackgroundColor: 'rgb(255, 99, 132)',
                // 数据 如[1, 2, 3, 4, 5, 6, 7, 8]
                data: [65, 59, 90, 81, 56,90]
            },
            {
                // 雷达图颜色
                backgroundColor: '#ccc',
                borderColor: 'rgb(54, 162, 235)',
                pointBackgroundColor: 'rgb(255, 99, 132)',
                // 数据 如[1, 2, 3, 4, 5, 6, 7, 8]
                data: [28, 48, 40, 19, 88,59]
            }
            ]
        },
        options: {
          ticks: {
                    fontColor: '#fff',
                    showLabelBackdrop: false
                },
          legend: {
            display: false
          },
            fontColor:'#fff',
            scale: {
                // ticks 0 10 20等标签
                fontColor: '#ffffff',
                ticks: {
                    display: false
                },
                gridLines: {
                    color: '#fff',
                }
            }
        }
    };

    return config;
      },
      drawchart () {
        var ctx = document.getElementById("charts14").getContext('2d');

        var myChart = new Chart(ctx, this.radarConfig());
      } 
    }
  }
</script>
<style></style>
